//
//  ZPBHeartOneCollectionReusableView.m
//  WZLProduct
//
//  Created by boys on 16/3/21.
//  Copyright © 2016年 HaiTeng. All rights reserved.
//

#import "ZPBHeartOneCollectionReusableView.h"

@implementation ZPBHeartOneCollectionReusableView
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.titleLabel = [[UILabel alloc] init];
        _titleLabel.backgroundColor = [UIColor blackColor];
        [self addSubview:_titleLabel];
        [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.offset(18);
            make.top.offset(5);
            make.bottom.offset(-5);
            make.width.offset(kScreenWidth / 4);
        }];
        self.upDataLabel = [[UILabel alloc] init];
        _upDataLabel.backgroundColor = [UIColor blueColor];
        [self addSubview:_upDataLabel];
        [_upDataLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.width.height.equalTo(_titleLabel);
            make.left.offset(10 + kScreenWidth / 4 + 5);
            _upDataLabel.font = [UIFont systemFontOfSize:12];
        }];
        self.moreButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _moreButton.backgroundColor = [UIColor redColor];
        [_moreButton setTitle:@"更多" forState:(UIControlStateNormal)];
        [_moreButton addTarget:self action:@selector(moreButtonAction:) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:_moreButton];
        [_moreButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.equalTo(_titleLabel);
            make.right.offset(- 25);
            make.width.offset(kScreenWidth / 5);
        }];
//
        self.moreImg = [[UIImageView alloc] init];
        _moreImg.backgroundColor = [UIColor redColor];
        [self addSubview:_moreImg];
        [_moreImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.equalTo(_titleLabel);
            make.right.offset(- 10);
            make.width.offset(10);
        }];
        
    }
    return self;
}


- (void)moreButtonAction:(UIButton *)button {
    
}
@end
